<!-- App.vue -->
<template>
  <div id="app">
    <div v-if="isAuthenticated">
      <SideMenu />
      <div class="content">
        <router-view></router-view>
      </div>
    </div>
    <div v-else>
      <router-view></router-view>
    </div>
  </div>
</template>

<script>
import SideMenu from '@/components/SideMenu.vue';
import { mapState } from 'vuex';

export default {
  components: {
    SideMenu,
  },
  computed: {
    ...mapState(['isAuthenticated']),
  },
};
</script>

<style scoped>
#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.content {
  flex: 1;
  padding: 20px;
}
</style>